Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>You can use an array to display the name of the weekday:</p> <p id="demo"></p> <script> var d = new Date(); var days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; document.getElementById("demo").innerHTML = days[d.getDay()]; </script> </body> <!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_date_weekday by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:24:20 GMT --> </html>
Result:
Try it Yourself - © w3schools.com